#ifndef OPENGLWIDGET_H
#define OPENGLWIDGET_H

#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QtMath>
#include <QtDebug>
#include <QPainter>
#include <QPainterPath>
#include <QElapsedTimer>

class OpenGLWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
    Q_OBJECT
public:
    OpenGLWidget(QWidget *parent = nullptr);
    ~OpenGLWidget();

protected:
    void initializeGL();
    void paintGL();
    void resizeGL(int w, int h);

private:
    void initializeOriginArraies(int num);

private:
    QElapsedTimer *time;
    QOpenGLShaderProgram *shaderProgram;
    qreal *originX;
    qreal *originY;
    int pointsAmount;

    int color;
    QVector4D lineColor;

    int count;
};

#endif // OPENGLWIDGET_H
